Hi,

I want to share some code which is defined inside a module from which I build an .exe. I want to reuse it in another .Exe

I know, the correct way is to factor it out into an extra lib and link it to both modules.

I discovered, that I can export the needed symbols from the .exe through a .def file, just like as it where an DLL and link it to the other exe. It compiles flawlessly. At runtime it crashes with a memory read error once it touches the linked code. So probably it's not valid what I try to do. Maybe someone is able to explain why it crashes?

Thank you!